import { BRAND, ADVANCEFORMINFO } from '../constants/counter'

const INITIAL_STATE = {
  brandinfo: {},
  advanceinfo: {}
}

export default function counter(state = INITIAL_STATE, action) {
  switch (action.type) {
    case BRAND:
      return {
        ...state,
        brandinfo: {
          ...action.payload
        }
      }
    case ADVANCEFORMINFO:
      return {
        ...state,
        advanceinfo: {
          ...action.payload
        }
      }
    default:
      return state
  }
}
